#include <bits/stdc++.h>
using namespace std;
const int N = 100000 + 10;
int f,r,ans;
int read(){
    char ch; int sum = 0,flag = 1;
    ch = getchar();
    while(ch < '0' || ch > '9'){if(ch == '-') flag = -flag; ch = getchar();}
    while(ch >= '0' && ch <= '9'){sum = sum * 10 + ch - '0'; ch = getchar();}
    return flag * sum;
}
int a[N],n;
int k[N],att[N];
int main(){
	freopen("duel.in","r",stdin);
	freopen("duel.out","w",stdout);
    n = read();
    for(int i = 1; i <= n; i++){
        a[i] = read();
    }
    sort(a + 1,a + n + 1);
    f = 1,r = 2;
    while(a[r] <= a[f]) r++;
    while(f <= n && r <= n){
        if(a[f] < a[r]) f++,r++;
        else r++;
    }
    printf("%d\n",n - f + 1);
    return 0;
}
